import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import PersonalCenter from "@/components/PersonalCenter";
import Login from "@/views/Login";
import Classification from "@/components/Classification";
import Register from "@/views/Register";
import Modify from "@/views/Modify";
import ComicDetail from "@/views/ComicDetail";
import SearchView from "@/views/SearchView";
import PaySuccess from "@/views/PaySuccess";
import ShowAll from "@/views/ShowAll";


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/personal',
        name: 'personal',
        component: PersonalCenter
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/fication',
        name: 'fication',
        component: Classification
    },
    {
        path: '/register',
        name: 'register',
        component: Register
    },
    {
        path: '/modify',
        name: 'modify',
        component: Modify
    },
    {
        path: '/comic/:pk',
        name: 'comic',
        component: ComicDetail
    },
    {
        path: '/search',
        name: 'search',
        component: SearchView
    },
    {
        path: '/pay/success',
        name: 'paysuccess',
        component: PaySuccess
    },
    {
        path: '/showall/:pk',
        name: 'showall',
        component: ShowAll
    },



]

const router = new VueRouter({
    // mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
